//
//  EventProducer.swift
//  mall-ios
//
//  Created by Meak Tsui on 2018/11/30.
//  Copyright © 2018 Meak Tsui. All rights reserved.
//

import Foundation

public protocol StartAndStopAble {
    func start()
    func stop()
}

public protocol MTEventProducer {
    var hybrid:MTHybrid? {get set}
    var ns:Ns {get}
    var event:Api {get}
}

extension MTEventProducer {
    public func produce(params:[String:Any]) {
        let eventStr = event.rawValue
        hybrid?.callH5(event: eventStr, params: params)
    }
}
